package com.sundi.ecupms.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;
import java.util.List;


import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Mht
 * @since 2020-02-24
 */
@Data
@Accessors(chain = true)
@TableName("ec_menu")
public class EcMenu extends Model<EcMenu> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String icon;

    private String name;

    private Integer state;

    private String url;

    @TableField("p_id")
    private Integer pId;

    private String path;

    private String component;

    private List<EcMenu> children;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
